Skip to content

Conversation

@k0kubun
Copy link
Member

@k0kubun k0kubun commented Aug 14, 2025

I was stuck with this LoadError while psych is of course installed. It went away when I disabled bootsnap.

Because we run crashy Ruby implementations on yjit-bench, I think we can't expect bootstrap to do cache invalidation properly when it could crash in the middle of it. ISEQ caching is also something you'd like to disable and rule out its possibility of causing bugs when debugging a Ruby implementation. So I want to avoid using bootsnap in yjit-bench.

$ ./run_benchmarks.rb shipit --chruby 'interp::ruby-debug' --turbo --once
Running benchmark "shipit" (1/1)
+ setarch x86_64 -R taskset -c 10 /opt/rubies/ruby-debug/bin/ruby -I harness /home/k0kubun/src/github.com/Shopify/yjit-bench/benchmarks/shipit/benchmark.rb
ruby 3.5.0dev (2025-08-14T22:12:46Z master 70b4b6fea0) +PRISM [x86_64-linux]
Command: bundle check 2> /dev/null || bundle install
The Gemfile's dependencies are satisfied
Source locally installed gems is ignoring #<Bundler::StubSpecification name=psych version=5.2.6 platform=ruby> because it is missing extensions
Source locally installed gems is ignoring #<Bundler::StubSpecification name=io-console version=0.8.1 platform=ruby> because it is missing extensions
Source locally installed gems is ignoring #<Bundler::StubSpecification name=erb version=5.0.2 platform=ruby> because it is missing extensions
Source locally installed gems is ignoring #<Bundler::StubSpecification name=date version=3.4.1 platform=ruby> because it is missing extensions
/opt/rubies/ruby-debug/lib/ruby/3.5.0+3/yaml.rb:3: warning: It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/opt/rubies/ruby-debug/lib/ruby/3.5.0+3/bundled_gems.rb:55:in 'Kernel.require': cannot load such file -- /opt/rubies/ruby-debug/lib/ruby/gems/3.5.0+3/gems/psych-5.2.6/lib/psych.rb (LoadError)
        from /opt/rubies/ruby-debug/lib/ruby/3.5.0+3/bundled_gems.rb:55:in 'block (2 levels) in Kernel#replace_require'
        from /opt/rubies/ruby-debug/lib/ruby/gems/3.5.0+3/gems/bootsnap-1.18.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in 'Kernel#require'
        from /opt/rubies/ruby-debug/lib/ruby/3.5.0+3/yaml.rb:4:in '<main>'
        from /opt/rubies/ruby-debug/lib/ruby/3.5.0+3/bundled_gems.rb:55:in 'Kernel.require'
        from /opt/rubies/ruby-debug/lib/ruby/3.5.0+3/bundled_gems.rb:55:in 'block (2 levels) in Kernel#replace_require'
        from /opt/rubies/ruby-debug/lib/ruby/gems/3.5.0+3/gems/bootsnap-1.18.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in 'Kernel#require'
        from /opt/rubies/ruby-debug/lib/ruby/gems/3.5.0+3/gems/bootsnap-1.18.6/lib/bootsnap/compile_cache/yaml.rb:58:in 'Bootsnap::CompileCache::YAML.init!'
        from /opt/rubies/ruby-debug/lib/ruby/gems/3.5.0+3/gems/bootsnap-1.18.6/lib/bootsnap/compile_cache/yaml.rb:38:in 'Bootsnap::CompileCache::YAML.install!'
        from /opt/rubies/ruby-debug/lib/ruby/gems/3.5.0+3/gems/bootsnap-1.18.6/lib/bootsnap/compile_cache.rb:25:in 'Bootsnap::CompileCache.setup'
        from /opt/rubies/ruby-debug/lib/ruby/gems/3.5.0+3/gems/bootsnap-1.18.6/lib/bootsnap.rb:68:in 'Bootsnap.setup'
        from /opt/rubies/ruby-debug/lib/ruby/gems/3.5.0+3/gems/bootsnap-1.18.6/lib/bootsnap.rb:112:in 'Bootsnap.default_setup'
        from /opt/rubies/ruby-debug/lib/ruby/gems/3.5.0+3/gems/bootsnap-1.18.6/lib/bootsnap/setup.rb:5:in '<top (required)>'
        from /opt/rubies/ruby-debug/lib/ruby/3.5.0+3/bundled_gems.rb:55:in 'Kernel.require'
        from /opt/rubies/ruby-debug/lib/ruby/3.5.0+3/bundled_gems.rb:55:in 'block (2 levels) in Kernel#replace_require'
        from /home/k0kubun/src/github.com/Shopify/yjit-bench/benchmarks/shipit/config/boot.rb:4:in '<top (required)>'
        from /home/k0kubun/src/github.com/Shopify/yjit-bench/benchmarks/shipit/config/application.rb:1:in 'Kernel#require_relative'
        from /home/k0kubun/src/github.com/Shopify/yjit-bench/benchmarks/shipit/config/application.rb:1:in '<top (required)>'
        from /home/k0kubun/src/github.com/Shopify/yjit-bench/benchmarks/shipit/config/environment.rb:2:in 'Kernel#require_relative'
        from /home/k0kubun/src/github.com/Shopify/yjit-bench/benchmarks/shipit/config/environment.rb:2:in '<top (required)>'
        from /home/k0kubun/src/github.com/Shopify/yjit-bench/benchmarks/shipit/benchmark.rb:13:in 'Kernel#require_relative'
        from /home/k0kubun/src/github.com/Shopify/yjit-bench/benchmarks/shipit/benchmark.rb:13:in '<main>'
Command "setarch x86_64 -R taskset -c 10 /opt/rubies/ruby-debug/bin/ruby -I harness /home/k0kubun/src/github.com/Shopify/yjit-bench/benchmarks/shipit/benchmark.rb" failed with exit code 1 in directory /home/k0kubun/src/github.com/Shopify/yjit-bench
Total time spent benchmarking: 1s
Failed benchmarks: 1

interp: ruby 3.5.0dev (2025-08-14T22:12:46Z master 70b4b6fea0) +PRISM [x86_64-linux]

------  -----------  ----------
bench   interp (ms)  stddev (%)
shipit  N/A          N/A
------  -----------  ----------

Output:
/home/k0kubun/src/github.com/Shopify/yjit-bench/data/output_075.json

Failed benchmarks:
  interp: shipit

@k0kubun k0kubun requested a review from a team August 14, 2025 23:12
@k0kubun k0kubun merged commit 152318b into ruby:main Aug 15, 2025
4 checks passed
@k0kubun k0kubun deleted the drop-bootsnap branch August 15, 2025 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants